class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def say(self):
        print('我叫' + self.name + '，我今年' + str(self.age) + '岁了')


a = Person('张晓梦', 10)
b = Person('张晨星', 4)
c = Person("赵若辉", 38)
d = Person("张浩", 37)


class family(Person):
    def __init__(self, member):
        self.member = member

    def introduce(self):
        names = []
        for tmp in self.member:
            names.append(tmp.name)
        print('我家有' + str(len(self.member)) + '个人。他们的名字是:' + ','.join(names) + "。")


print(type(a))
e = family([a, b, c, d])
e.introduce()



